<!--
* description: 月份选择器
* author: lanrj
* createdDate: 2020-04-16
-->
<template>
  <el-col :span="span">
    <lableName
      :validrule="validrule"
      :curLabelName="curLabelName"
      :isShowLabel="isShowLabel"
      :isRequire="isRequire"
    ></lableName>
    <el-date-picker
      v-model="modelCode"
      :type="dateType"
      :picker-options="pickerOptions"
      @change="sendCode"
      :value-format="format"
      @clear="clearCode"
      clearable
      :disabled="disabled"
      placeholder="选择日期"
      unlink-panels
    ></el-date-picker>
    <validateFormate :curLabelName="curLabelName" :validrule="validrule"></validateFormate>
  </el-col>
</template>
<script>
import { inputMixins } from "@/components/mixins/inputMixins";
export default {
  name: "datePicker",
  mixins: [inputMixins],
  components: {
    lableName: () => import("@/components/lableName"), //标题溢出样式组件
    validateFormate: () => import("@/components/validateFormate") //校验提示样式组件
  },
  props: {
    dateType: { type: String, default: "month" },
    format: { type: String, default: "yyyy-MM" },
    // 日期控件选项类型
    dateOptionsType: { type: String, default: "" }
  },
  data() {
    return {
      pickerOptions: {}
    };
  }
};
</script>
